using System.Collections.Generic;

public class Table_MissionItem
{
    /// <summary>
    /// 唯一ID
    /// <summary>
    public int Id { get; private set; }
    /// <summary>
    /// 任务标题
    /// <summary>
    public string Title { get; private set; }
    /// <summary>
    /// 任务描述
    /// <summary>
    public string Desc { get; private set; }
    /// <summary>
    /// 任务图标
    /// <summary>
    public string Icon { get; private set; }
    /// <summary>
    /// 图标图集
    /// <summary>
    public string Atlas { get; private set; }
    /// <summary>
    /// 任务类型
    /// <summary>
    public int TaskType { get; private set; }
    /// <summary>
    /// 功能点类型
    /// <summary>
    public int FuncType { get; private set; }
    /// <summary>
    /// 功能点数量
    /// <summary>
    public int FuncNum { get; private set; }
    /// <summary>
    /// 后置任务id
    /// <summary>
    public int NextId { get; private set; }
    /// <summary>
    /// 跳转界面id
    /// <summary>
    public int UId { get; private set; }
    /// <summary>
    /// 优先级
    /// <summary>
    public int SortId { get; private set; }
    /// <summary>
    /// 奖励类型
    /// <summary>
    public int AwardType { get; private set; }
    /// <summary>
    /// 奖励ID
    /// <summary>
    public int AwardId { get; private set; }
    /// <summary>
    /// 奖励数量
    /// <summary>
    public int AwardNum { get; private set; }
    /// <summary>
    /// 客户端显示类型
    /// <summary>
    public int ShowType { get; private set; }
    /// <summary>
    /// 完成后处理
    /// <summary>
    public int Finish { get; private set; }

    public Table_MissionItem(ExcelLineReader reader)
    {
        Id = reader.ReadInt();
        Title = reader.ReadString();
        Desc = reader.ReadString();
        Icon = reader.ReadString();
        Atlas = reader.ReadString();
        TaskType = reader.ReadInt();
        FuncType = reader.ReadInt();
        FuncNum = reader.ReadInt();
        NextId = reader.ReadInt();
        UId = reader.ReadInt();
        SortId = reader.ReadInt();
        AwardType = reader.ReadInt();
        AwardId = reader.ReadInt();
        AwardNum = reader.ReadInt();
        ShowType = reader.ReadInt();
        Finish = reader.ReadInt();
    }
}

public class Table_MissionMgr : IDataMgr
{
    protected override string FileName { get { return "Txt/Mission.txt"; } }

    protected List<Table_MissionItem> mItemList = new List<Table_MissionItem>();
    public Table_MissionItem GetItemByIdx(int idx)
    {
        return mItemList[idx];
    }
    public Table_MissionItem GetItemById(int id)
    {
        int idx = GetIdxById(id);
        return GetItemByIdx(idx);
    }

    public override void Load(ExcelLineReader reader)
    {
        var item = new Table_MissionItem(reader);
        mItemDic.Add(item.Id, mDataCount);
        mItemList.Add(item);
    }
}